<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/prosupply/Mall_procure_scenic.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions" 
    :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend"></view-grid>
  </div>
</template>

<script>
import extend from "@/extension/proSupply/Mall_procure_scenic.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
      ViewGrid
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: "Foots",
        cnName: '采购供应景区',
        name: 'Mall_procure_scenic',
        url: "/Mall_procure_scenic/",
        sortName: "id"
      },
      extend: extend,
      editFormFields: {
        scenic_supplierid:'',
        scenic_name:'',
        scenic_poiId:'',
        scenic_city:'',
        scenic_address:'',
        scenic_business_hours:'',
        scenic_status:'',
        scenic_images:[],
        merchantCode:'',
        merchantName:'',
      },
      editFormOptions: [
        [ {title:"采购供应商",field:"scenic_supplierid",type:"select",dataKey: 'procurementsupplier',data: [],required: true}],
        [
          { title: '景区名称', required: true, field: 'scenic_name', type: 'text'},
          { title: '景区编号', required: true,field: 'scenic_poiId', type: 'text'},
        ],
        [
          { title: '景点城市', field: 'scenic_city', required: true, type: 'text'},
          { title: '景点地址', field: 'scenic_address', required: true,type: 'text'},
        ],
        [
          { title: '营业时间', required: true, field: 'scenic_business_hours', type: 'is-range', edit: { type: 'is-range', keep: true, required: true }},
          { data: [{value:'营业中',key:0}, {value:'已关门',key:1}, {value:'筹建中',key:2}, {value:'暂停营业',key:3} ], title: '营业类型', required: true, field: 'scenic_status', type: 'select'},
        ],
        [
          { title: '景区图片', maxSize: 1, field: 'scenic_images', colSize: 12, type: 'imgupgrade', img: true, maxFile: 5, multiple: true},
        ]
      ],
      searchFormFields: { scenic_name:'',scenic_supplierid:''},
      searchFormOptions: [
        [
          { title: '景区名称', field: 'scenic_name', type: 'text' },
          { dataKey: 'procurementsupplier', data: [],title: '采购供应商',field: 'scenic_supplierid',type: 'select' },
        ]
      ],
      columns: [
        { field:'scenic_supplierid',title:'采购供应商',type:'select', bind: { key: 'procurementsupplier', data: []}},
        { field:'scenic_name',title:'景区名称',type:'string'},
        { field:'scenic_poiId',title:'景区编号',type:'string'},
        { field:'scenic_city',title:'景点城市',type:'string'},
        { field:'scenic_address',title:'景点地址',type:'string'},
        { field:'scenic_business_hours',title:'营业时间',type:'string'},
        { field:'scenic_status',title:'营业类型',type:'select', bind: { key: '', data: [{value:'营业中',key:0}, {value:'已关门',key:1}, {value:'筹建中',key:2}, {value:'暂停营业',key:3}]}},
        { field:'scenic_images',title:'景区图片',type:'imgupgrade'},
        { field:'merchantName',title:'商户名称',type:'string'},
        { field:'createDate',title:'创建时间',type:'datetime',sortable:true},
        { field:'creator',title:'创建人',type:'string'}
      ],
      detail: {
        cnName:"#detailCnName",
        columns: [],
        sortName: "",
        key:""
      }
    };
  }
};
export default vueParam;
</script>
